
#include "mainscene.h"
#include "ui_mainscene.h"
#include<QIcon>
#include<QPainter>
MainScene::MainScene(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::MainScene)
{
    ui->setupUi(this);

   //创建鸟（统一鸟吧)的对象
    this->m_Bird=new Bird;

    //将鸟的对象显示到窗口
    this->m_Bird->setParent(this);
}

void MainScene::paintEvent(QPaintEvent *)
{
    QPainter painter(this);
    painter.drawPixmap(0,0,this->m_Bird->m_Bird_Pix);
 }
MainScene::~MainScene()
{
    delete ui;
}


